cmake_minimum_required(VERSION 3.21)
project(Cstudy_imooc C)

set(CMAKE_C_STANDARD 11)


add_executable(type_int unit01/type_int.c)
add_executable(type_char unit01/type_char.c)
add_executable(type_float unit01/type_float.c)
add_executable(variable unit01/variable.c)
add_executable(constant unit01/constant.c)
add_executable(base_function unit02/base_function.c)
add_executable(prototype_function unit02/prototype_function.c)
add_executable(variable_types_and_scope unit02/variable_types_and_scope.c)
add_executable(varargs unit02/varargs.c)
add_executable(myHeaderTest unit03/src/myHeaderTest.c)
add_executable(macro_function unit03/src/macro_function.c)
add_executable(conditional_macro unit03/src/conditional_macro.c)
add_executable(printlnf unit03/src/printlnf.c)
add_executable(array_basics unit04/array_basics.c)
add_executable(array_limits unit04/array_limits.c)
add_executable(string unit04/string.c)
add_executable(array_parameter unit04/array_parameter.c)
add_executable(2d_array unit04/2d_array.c)
add_executable(reverse_array unit04/apply_array.c)
add_executable(point_basics unit05/pointer_basics.c)
add_executable(readonly_pointer unit05/readonly_pointer.c)
add_executable(pointer_values unit05/pointer_values.c)
add_executable(pointer_operations unit05/pointer_operations.c)
add_executable(lvalue_rvalue unit05/lvalue_rvalue.c)
add_executable(pointer_paramter_as_return_value unit05/pointer_paramter_as_return_value.c)
add_executable(dynamic_memory unit05/dynamic_memory.c)
add_executable(function_pointer unit05/function_pointer.c)
add_executable(swap_values unit05/swap_values.c)


# 把自己的头文件引入进来，可以使用#include <xxx.h>来引入头文件
include_directories(unit03/include)